package com.gxa.weixing.core.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

/**
 * @author lijianmin
 * @date 2022/01/05  22:58:02
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_goods_detail")
@ApiModel(value = "商品详情对象")
public class GoodsDetail {



    /**
     * 商品详情编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "goods_detail_id")
    @ApiModelProperty(name = "id", value = "编号", dataType = "Long", example = "1")
    private Long id;

    /**
     * 商品编号
     */
    @Column(name = "goods_id")
    @ApiModelProperty(name = "goodsId", value = "商品编号", dataType = "Long", example = "1")
    private Long goodsId;

    /**
     * 包装规格/商品单位(斤/箱/个/条)
     */
    @Column(name = "goods_detail_unit")
    @ApiModelProperty(name = "unit", value = "包装规格(斤/箱/个/条/克)", dataType = "String", example = "千克")
    private String unit;

    /**
     * 商品单件重量 单位为g
     */
    @Column(name = "goods_detail_weight")
    @ApiModelProperty(name = "weight", value = "商品单件重量 单位为g", dataType = "Double", example = "1.3")
    private Double weight;

    /**
     * 商品库存
     */
    @Column(name = "goods_detail_inventory")
    @ApiModelProperty(name = "inventory", value = "商品库存", dataType = "Integer", example = "100")
    private Integer inventory;

    /**
     * 商品已售
     */
    @Column(name = "goods_detail_sold")
    @ApiModelProperty(name = "sold", value = "商品已售", dataType = "Integer", example = "100")
    private Integer sold;

    /**
     * 商品虚拟已售量
     */
    @Column(name = "goods_detail_sold_virtual")
    @ApiModelProperty(name = "soldVirtual", value = "商品虚拟已售量", dataType = "Integer", example = "100")
    private Integer soldVirtual;

    /**
     * 商品剩余库存
     */
    @Column(name = "goods_detail_surplus_inventory")
    @ApiModelProperty(name = "surplusInventory", value = "商品剩余库存", dataType = "Integer", example = "100")
    private Integer surplusInventory;

    /**
     * 商品详细介绍
     */
    @Column(name = "goods_detail_introduce")
    @ApiModelProperty(name = "introduce", value = "商品详细介绍", dataType = "String", example = "商品详细介绍")
    private String introduce;

    /**
     * 商品示例图
     */
    @Column(name = "goods_detail_sample_img")
    @ApiModelProperty(name = "sampleImg", value = "商品示例图", dataType = "String", example = "商品示例图")
    private String sampleImg;

    /**
     * 供应商编号
     */
    @Column(name = "supplier_id")
    @ApiModelProperty(name = "supplierId", value = "供应商编号", dataType = "Long", example = "1")
    private Long supplierId;

    /**
     * 添加时间
     */
    @Column(name = "goods_detail_add_time")
    @ApiModelProperty(name = "addTime", value = "添加时间", dataType = "Date", example = "添加时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date addTime;

    /**
     * 推广 是否开启推广
     */
    @Column(name = "goods_detail_promotion")
    @ApiModelProperty(name = "promotion", value = "推广", dataType = "Boolean", example = "true")
    private Boolean promotion;

    /**
     * 推广语
     */
    @Column(name = "goods_detail_promotion_statement")
    @ApiModelProperty(name = "promotionStatement", value = "推广语", dataType = "String", example = "推广语")
    private String promotionStatement;

    /**
     * 所属门店编号
     */
    @Column(name = "shop_id")
    @ApiModelProperty(name = "goodsId", value = "所属门店编号", dataType = "Long", example = "1")
    private Long shopId;

    /**
     * 门店销售状态(跟随门店编号  1 在售/ 0停售)
     */
    @Column(name = "goods_detail_shop_sales_state")
    @ApiModelProperty(name = "shopSalesState", value = "门店销售状态(1 在售/ 0停售)", dataType = "Boolean", example = "1")
    private Boolean shopSalesState;

    /**
     * 门店消耗
     */
    @Column(name = "goods_detail_shop_consume")
    @ApiModelProperty(name = "shopConsume", value = "门店消耗", dataType = "Double", example = "1")
    private Double shopConsume;

    /**
     * 修改时间
     */
    @Column(name = "goods_detail_update_time")
    @ApiModelProperty(name = "updateTime", value = "修改时间", dataType = "Date", example = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GTM+8")
    private Date updateTime;
}
